<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>

        // if(3 > 2 || 4 > 3 || 5 > 1) {}

        // 或运算见真即短路
        // 与运算见假及短路

        // console.log(0 || 5) ;  // 5

        var n = (3 || 5) ;
        console.log(n) ;   // 3

        var m = 0 || 3 ;
        console.log(m) ;   // 3

        var m = 3 || 0 ;
        console.log(m) ;  // 3


        var x = 1 && 2 ;
        console.log(x) ;  // 2


        var y = 0 && 2 ;
        console.log(y) ;  // 0

    </script>
    
</body>
</html>